/*
 * Copyright (c) 2021. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

import java.util.Scanner;

/**
 * 编写程序，提示用户输入一个整数，而后检测该整数是否能被 5 和 6 同时整除，至少能
 * 被 5 或 6 整除，仅能被 5 或 6 整除。下面是输入 10 时的输出样例
 * IS 10 divisible by 5 and 6? false
 * is 10 divisible by 5 or 6? true
 * Is 10 divisible by 5 or 6,but not both? true
 */
public class HomeWork0312005 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int num = sc.nextInt();
        System.out.format("IS %s divisible by 5 and 6? %s\n", num,
                num%5==0 && num%6==0);
        System.out.format("IS %s divisible by 5 or 6? %s\n", num,
                num%5==0 || num%6==0);
        System.out.format("Is %s divisible by 5 or 6,but not both? %s",num,
                (num%5==0 || num%6==0)&&!(num%5==0 && num%6==0));


    }
}
